package com.gjy.spring.s7;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-12-20 10:30:11
 */
@SpringBootApplication
public class S7App {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(S7App.class, args);
        context.close();
    }

    @Bean(initMethod = "init3")
    public Bean1 bean1() {
        return new Bean1();
    }

    @Bean(destroyMethod = "destroy3")
    public Bean2 bean2() {
        return new Bean2();
    }

}
